package eddy.imageprocess;

import java.awt.Dimension;
import java.awt.Toolkit;

import javax.swing.JFrame;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.plaf.metal.MetalLookAndFeel;

public class Main {
   public static void main(String[] args) {
      
      UIManager.put("swing.boldMetal", Boolean.FALSE);
//      JDialog.setDefaultLookAndFeelDecorated(true);
//      JFrame.setDefaultLookAndFeelDecorated(true);
      Toolkit.getDefaultToolkit().setDynamicLayout(true);
      System.setProperty("sun.awt.noerasebackground","true");

      try {
         //new MotifLookAndFeel()
         //new WindowsLookAndFeel()
         //new MetalLookAndFeel
//         UIManager.getCrossPlatformLookAndFeelClassName());
         
          UIManager.setLookAndFeel(new MetalLookAndFeel());
      }  
      catch ( UnsupportedLookAndFeelException e ) {
          System.out.println ("Metal Look & Feel not supported on this platform. \nProgram Terminated");
          System.exit(0);
      }
      
      ImageProcessFrame frame = new ImageProcessFrame();
      Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
      frame.setLocation(d.width/2 - frame.getWidth()/2, d.height/2 - frame.getHeight()/2);
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      frame.setVisible(true);
   }
}
